package com.example.demo514.demos.web.controller;

import com.example.demo514.demos.web.exceptionHandler.BusinessException;
import com.example.demo514.demos.web.resultVO.ResponseEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/my")
public class MyController {

    @GetMapping("/m")
    public void myMethod() {
        System.out.println("我的操作");
        System.out.println("哈哈哈我又回来啦哈哈哈");
        System.out.println("版本1开发完成");
        if(true){
           throw new BusinessException(ResponseEnum.CODE_ERROR);

        }
    }

}
